﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ppUpDocPis.aspx.cs" Inherits="Protegidos_Pessoas_DadosPessoa__popup_ppUpDocPis" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register TagPrefix="uc1" TagName="HeadTag"  Src="~/_includes/HeadTag.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <!-- Includes -->
    <uc1:HeadTag ID="HeadTag1" runat="server" />
    <title>Upload de PIS/PASEP</title>
</head>
<body>
    <form id="form1" runat="server">
    
        <script type="text/javascript">
            function CloseAndRebind(args)
            {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.refreshGrid(args);
            }
    		
            function GetRadWindow()
            {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
    				
                return oWindow;
            }

            function CancelEdit()
            {
                GetRadWindow().Close();
            }

            function validateRadUpload1(source, arguments) {
                arguments.IsValid = getRadUpload('<%= RadUpload1.ClientID %>').validateExtensions();
            }
        </script>
        
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
        
        <table width="99%" class="textoCZ_12B" align="right">
            <tr id="tr1" runat="server">
                <td>
                    <div class="subTitulo_pagina">Dados da PIS/PASEP</div>
                    <div class="espaco"></div>
                </td>
            </tr>
            <tr id="tr2" runat="server">
                <td>
                
                    <table class="textoCZ_12B">
                        <tr>
                            <td style="width: 150px">Número:</td>
                            <td>
                                <asp:TextBox ID="txtNumero" runat="server"></asp:TextBox>    
                                <asp:RequiredFieldValidator runat="server" ID="RequiredFieldValidator2" ControlToValidate="txtNumero"
                                    InitialValue="" ErrorMessage="*" ValidationGroup="1" />
                            </td>
                        </tr>
                    </table>
                
                </td>
            </tr>
            <tr id="tr3" runat="server">
                <td>
                    <div class="subTitulo_pagina">Imagem</div>
                    <div class="espaco"></div>
                </td>
            </tr>
            <tr>
                <td>
                
                    <!-- -->
                <table width="99%" align="right">
                    <tr runat="server" id="trMsg">
                        <td>
                            <p>&nbsp;&nbsp;<span style="font-weight: bold;">Carregue um arquivo de no máximo 300KB</span></p>
                        </td>
                    </tr>
                    <tr runat="server" id="trSeleciona">
                        <td>
                            <telerik:RadUpload ID="RadUpload1" runat="server" 
                                ControlObjectsVisibility="None"
                                EnableFileInputSkinning="true" 
                                InitialFileInputsCount="1" 
                                Culture="Portuguese (Brazil)" Width="400px" Skin="Telerik" 
                                MaxFileInputsCount="1"  
                                AllowedFileExtensions=".pdf" >
                                <Localization Add="Adicionar" Remove="Remover" Select="Procurar..." />
                            </telerik:RadUpload>
                            
                            <asp:CustomValidator ID="Customvalidator1" runat="server" Display="Dynamic" ClientValidationFunction="validateRadUpload1">
                            <span style="FONT-SIZE: 12px;">Formato inválido!</span>
                            </asp:CustomValidator>
                            <br>
                            <telerik:RadProgressArea id="progressArea1" runat="server" Skin="Default" >
                                <Localization Uploaded="Enviado" CurrentFileName="Arquivo:" 
                                    ElapsedTime="Tempo:" EstimatedTime="Tempo estimado:" 
                                    TotalFiles="Total de arquivos:" TransferSpeed="Velocidade:" 
                                    UploadedFiles="Arquivos enviados:"></Localization>
                            </telerik:RadProgressArea>
                        </td>
                    </tr>
                    <tr runat="server" id="trResultado">
                        <td>
                            <asp:label id="labelNoResults" runat="server" visible="True">Arquivo não Enviado.</asp:label>
                            <asp:Repeater id="repeaterResults" runat="server" visible="False">
                                <HeaderTemplate>
                                    Arquivo Enviado.<br />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <span style="font-weight: normal; font-size: 12px; color: black;">
                                        Arquivo:&nbsp;<%#DataBinder.Eval(Container.DataItem, "FileName").ToString()%><br />
                                        Tamanho&nbsp;do&nbsp;Arquivo:&nbsp;<%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + "&nbsp;bytes"%><br />
                                        <br /><br />
                                    </span>
                                </ItemTemplate>
                            </asp:Repeater>      
                        </td>
                    </tr>
                </table>
                <!-- -->
                
                </td>
            </tr>
            <tr>
                <td align="right">
                <br />
                <asp:Button ID="btnSalvar" runat="server" Text="Salvar" Width="110px" ValidationGroup="1" onclick="btnSalvar_Click" />&nbsp;&nbsp;
                <asp:Button ID="btnLimpar" runat="server" Text="Limpar" Width="110px" />&nbsp;&nbsp;
                <asp:Button ID="btnFechar" runat="server" Text="Fechar" Width="110px" onclick="btnFechar_Click" />&nbsp;&nbsp;
                </td>
            </tr>
        </table>
    
    </form>
</body>
</html>
